PhoneGap Essentials by Turkovic Ivan

PhoneGap Essentials by Turkovic Ivan

Author:Turkovic, Ivan [Turkovic, Ivan]
Language: eng
Format: epub, azw3
Publisher: Packt Publishing
Published: 2015-09-07T03:00:00+00:00


Every application needs to load the cordova.js file first, if you want to use PhoneGap's plugin API; it also provides events when it is ready to use them. Next we simplify the index.js file and enter the following code that will set the div tag with the text Device is ready after PhoneGap is fully loaded and functional:

document.addEventListener("deviceready", function(event) { var element = document.getElementById("phonegap"); element.innerHTML = "Device is ready"; }, false);

Since the generated content comes with CSS styles, we have to update the css/index.css file with the following rule:

#phonegap { text-align: center; }



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.